package com.iye.puretennis.domain;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: jing wu
 * Date: 2014/11/24
 * Time: 10:54
 */
public class Group {

    private String guid;

    private String name;

    private String ownerGuid;

    private String ownerName;

    private String ownerAvatar;

    private String access;

    private String description;

    private int activity;

    private int participantsAmount;

    //当前用户是否在该群
    private boolean inGroup;

    private List<UserInfo> groupParticipants = new ArrayList<UserInfo>();


    Group() {
    }

    public Group(String guid, String name, String ownerGuid, String ownerName, String ownerAvatar, int activity, int participantsAmount, boolean inGroup, String access, String description) {
        this.guid = guid;
        this.name = name;
        this.ownerGuid = ownerGuid;
        this.ownerName = ownerName;
        this.ownerAvatar = ownerAvatar;
        this.activity = activity;
        this.participantsAmount = participantsAmount;
        this.inGroup = inGroup;
        this.access = access;
        this.description = description;
    }

    public String getGuid() {
        return guid;
    }

    public String getName() {
        return name;
    }

    public String getOwnerGuid() {
        return ownerGuid;
    }

    public String getOwnerName() {
        return ownerName;
    }

    public int getActivity() {
        return activity;
    }

    public int getParticipantsAmount() {
        return participantsAmount;
    }

    public boolean isInGroup() {
        return inGroup;
    }

    public String getOwnerAvatar() {
        return ownerAvatar;
    }

    public List<UserInfo> getGroupParticipants() {
        return groupParticipants;
    }

    public void setGroupParticipants(List<UserInfo> groupParticipants) {
        this.groupParticipants = groupParticipants;
    }

    public void addParticipant() {
        participantsAmount++;
    }

    public void removeParticipant() {
        participantsAmount--;
    }

    public String getAccess() {
        return access;
    }

    public String getDescription() {
        return description;
    }
}
